package com.eshop;

import java.io.*;
import java.sql.*;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mysql.jdbc.PreparedStatement;

/**
 * Servlet implementation class AddProduct
 */
@WebServlet("/AddProduct")
public class AddProduct extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public AddProduct() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
				
		ResultSet rs = null;
		response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		
		// Display the result set as a list
		out.println("<HTML><HEAD><TITLE>NewProduct</TITLE></HEAD>");
		out.println("<BODY>");
		out.println("<form method=\"Post\" action=\"addProduct\">");
		out.println("<p>Username: <input type=\"text\" username=\"username\" size=\"20\"></p>");
		out.println("<p>First Name: <input type=\"text\" name=\"firstname\" size=\"20\"></p>");
		out.println("<p>Second Name: <input type=\"text\" name=\"secondname\" size=\"20\"></p>");
		out.println("<p>Phone:<input type=\"text\" name=\"phone\" size=\"20\"></p>");
		out.println("<p>Address: <input type=\"text\" name=\"address\" size=\"20\"></p>");
		out.println("<p>  <input type=\"submit\" value=\"Submit\" name=\"B1\"></p>");
		out.println("</form>");
		out.println("</BODY></HTML>");
}


	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}
